<template>
	<view class="top_box" :class="boxShadow?'shadow':''" style="height: 88rpx ;">
		<view class="fanhui_top" @click="back">
			<image src="../../static/icon/back_left.png" mode=""></image>
		</view>
		<view class="top_middle" style="">{{topTitle}}</view>
		<view class="" style=" display: flex;align-items: center;">
			<view v-if="isRigh==false" class="fanhui_top" style="opacity: 0;">
				<image src="../../static/icon/back_left.png" mode=""></image>
			</view>
			<view v-else class="fanhui_top">	
				<slot name="right"></slot>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	
	props: {
		// 缺省图
		topTitle:{
			type: String,
			default: ''
		},
		isRigh:{
			type: Boolean,
			default: false
		},
		boxShadow:{
			type: Boolean,
			default: true
		},
	},
	data() {
		return {};
	},
	methods: {
		back() {
			uni.navigateBack();
		}
	}
};
</script>

<style lang="scss" scoped>
.top_box {
	width: 100%;
	padding: 0% 6%;
	margin: auto;
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: #ffffff;
	/* box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(0, 0, 0, 0.1); */
	// box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.1);
}
.shadow{
	box-shadow: 0px 3px 4px rgba(112, 107, 107, 0.1);
}

.fanhui_top {
	width: 56rpx;
	height: 56rpx;
	// box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(0, 0, 0, 0.1);
	border-radius: 10rpx 10rpx 10rpx 10rpx;
}
.fanhui_top image {
	width: 100%;
	height: 100%;
	display: block;
}
.top_middle {
	color: #333333;
	font-size: 30rpx;
}
.zhanwei {
	width: 56rpx;
	height: 56rpx;
}
</style>
